package com.heima.model.common.enums;

public enum AppHttpCodeEnum {

    // 成功段0
    SUCCESS(200,"操作成功"),
    // 登录段1~50
    NEED_LOGIN(1,"需要登录后操作"),
    LOGIN_PASSWORD_ERROR(2,"密码错误"),
    // TOKEN50~100
    TOKEN_INVALID(50,"无效的TOKEN"),
    TOKEN_EXPIRE(51,"TOKEN已过期"),
    TOKEN_REQUIRE(52,"TOKEN是必须的"),
    // SIGN验签 100~120
    SIGN_INVALID(100,"无效的SIGN"),
    SIG_TIMEOUT(101,"SIGN已过期"),
    // 参数错误 500~1000
    PARAM_REQUIRE(500,"缺少参数"),
    PARAM_INVALID(501,"无效参数"),
    PARAM_IMAGE_FORMAT_ERROR(502,"图片格式有误"),
    SERVER_ERROR(503,"服务器内部错误"),
	LOGIC_ERROR(550,"业务数据错误"),
	NOT_FOUND_USERNAME(504,"请输入用户名"),
	NOT_FOUND_PASSWORD(505,"请输入密码"),
	NOT_FOUND_USER_INFO(506,"用户名错误"),
	LACK_TITLE(507,"缺少标题"),
	LACK_CHANNEL(508,"缺少关联频道"),
	LACK_LABEL(509,"缺少标签"),
	LACK_CONTENT(510,"缺少主题内容"),
	LACK_COVER_TYPE(511,"请选择文章封面类型"),
	NEED_EQUIPMENT_ID(514,"请合法使用,需要设备参数"),
	NOT_FOUND_USER_BY_PHONE(515,"手机号输入有误,或该手机号未注册"),

    // 数据错误 1000~2000
    DATA_EXIST(1000,"数据已经存在"),
    AP_USER_DATA_NOT_EXIST(1001,"该app用户不存在"),
    DATA_NOT_EXIST(1002,"数据不存在"),
    NOT_FOUND_CHANNEL(1004,"没有查询到相关频道"),
    CHANNEL_STATUS_IS_TRUE(1005,"该频道为有效频道,不可删除"),
    USERNAME_EXISTENCE(1006,"用户名已存在"),
    PHONE_EXISTENCE(1007,"手机号已被注册"),
    EMAIL_EXISTENCE(1008,"邮箱已被注册"),
    NOT_FOUND_SENSITIVE(1009,"没有查询到敏感词信息"),
    SENSITIVE_EXISTENCE(1010,"该敏感词已存在"),
    NOT_FOUND_AUTH_INFO(1011,"未找到该审核信息"),
    NOT_DOUBLE_REVIEW(1012,"无需重复审核"),
    AUTHOR_EXISTENCE(1013,"作者已存在,无需重复创建"),
    WE_MEDIA_PEOPLE_EXISTENCE(1014,"自媒体人已存在,无需重复创建"),
    FILE_UPLOAD_FAIL(1015,"文件上传失败"),
    NOT_FOUND_MATERIAL(1016,"资源不存在"),
    MATERIAL_IN_USE(1017,"该资源正在被使用"),
    NOT_FOUND_NEWS(1018,"文章不存在"),
    NEWS_IS_ENABLE(1019,"文章为发布上架状态,不可删除"),
    NEWS_IS_DISABLE(1020,"文章不是发布状态,不可执行上下架操作"),
    NOT_FOUND_ARTICLE(1021,"未找到app文章信息"),
    NEWS_AUTHOR_IS_NOT_FOUND(1022,"未找到文章关联的作者信息"),
    NEWS_STATUS_IS_NOT_ADMIN_AUTH(1023,"文章不需要人工审核"),
    NOT_FOUND_ARTICLE_CONFIG(1024,"未找到文章相关的配置信息"),
    NOT_FOUND_ARTICLE_CONTENT(1025,"未找到文章相关的内容信息"),
    ARTICLE_IS_DELETE(1026,"文章已删除"),
    ARTICLE_IS_DOWN(1027,"文章已下架"),
    NOT_FOUND_AUTHOR(1028,"作者不存在"),
    NOT_SUPPORTED_OPERATION_FOCUS_ON_YOURSELF(1029,"不可以自关注"),
    FOLLOWING_ONE(1030,"已关注,无需重复关注1"),
    FOLLOWING_TWO(1031,"已关注,无需重复关注2"),
    NOT_FOLLOW_ONE(1032,"未关注,无法取消关注1"),
    NOT_FOLLOW_TWO(1033,"未关注,无法取消关注2"),
    // 数据错误 3000~3500
    NO_OPERATOR_AUTH(3000,"无权限操作"),
    NEED_ADMIND(3001,"需要管理员权限");

    int code;
    String errorMessage;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.errorMessage = errorMessage;
    }

    public int getCode() {
        return code;
    }

    public String getErrorMessage() {
        return errorMessage;
    }
}
